import layoutHeaderAside from '@/layout/header-aside';

// // 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
const _import = require('@/utils/util.import');

const meta = { auth: true };

export default {
  path: '/transferRemit/',
  name: 'transferRemit',
  meta,
  component: layoutHeaderAside,
  children: ((pre) => [
    {
      path: 'singleTransfer/singleTransferPre',
      name: `${pre}singleTransfer-singleTransferPre`,
      component: _import('transferRemit/singleTransfer/singleTransferPre'),
      meta: {
        ...meta,
        title: '普通转账',
        keepAlive: false,
        business: {
          singleTransferPre: 0,
        },
      },
    },
    {
      path: 'singleTransfer/singleTransferConf',
      name: `${pre}singleTransfer-singleTransferConf`,
      component: _import('transferRemit/singleTransfer/singleTransferConf'),
      meta: {
        ...meta,
        title: '普通转账-确认页',
        highlightTo: 'singleTransferPre',
        business: {
          singleTransferPre: 1,
        },
      },
    },
    {
      path: 'singleTransfer/singleTransferRes',
      name: `${pre}singleTransfer-singleTransferRes`,
      component: _import('transferRemit/singleTransfer/singleTransferRes'),
      meta: {
        ...meta,
        title: '普通转账-结果页',
        highlightTo: 'singleTransferPre',
        business: {
          singleTransferPre: 'END',
        },
      },
    },
    {
      path: 'singleTransfer/publicWelfarePre',
      name: `${pre}singleTransfer-publicWelfarePre`,
      component: _import('transferRemit/singleTransfer/publicWelfarePre'),
      meta: {
        ...meta,
        title: '公益捐款',
        business: {
          publicWelfarePre: 0,
        },
      },
    },
    {
      path: 'singleTransfer/publicWelfareConf',
      name: `${pre}singleTransfer-publicWelfareConf`,
      component: _import('transferRemit/singleTransfer/publicWelfareConf'),
      meta: {
        ...meta,
        title: '公益捐款-确认页',
        highlightTo: 'publicWelfarePre',
        business: {
          publicWelfarePre: 1,
        },
      },
    },
    {
      path: 'singleTransfer/publicWelfareRes',
      name: `${pre}singleTransfer-publicWelfareRes`,
      component: _import('transferRemit/singleTransfer/publicWelfareRes'),
      meta: {
        ...meta,
        title: '公益捐款-结果页',
        highlightTo: 'publicWelfarePre',
        business: {
          publicWelfarePre: 'END',
        },
      },
    },
    {
      path: 'transTransaction/transferSingleQry',
      name: `${pre}transTransaction-transferSingleQry`,
      component: _import('transferRemit/transTransaction/transferSingleQry'),
      meta: {
        ...meta,
        title: '单笔转账查询',
      },
    },
    {
      path: 'transTransaction/transferSingleDetail',
      name: `${pre}transTransaction-transferSingleDetail`,
      component: _import('transferRemit/transTransaction/transferSingleDetail'),
      meta: {
        ...meta,
        title: '单笔转账查询详情',
        // 菜单高亮规则和transTransaction相同
        highlightTo: 'transferSingleQry',
      },
    },
    {
      path: 'transTransaction/transferBatchQry',
      name: `${pre}transTransaction-transferBatchQry`,
      component: _import('transferRemit/transTransaction/transferBatchQry'),
      meta: {
        ...meta,
        title: '批量转账查询',
      },
    },
    {
      path: 'transTransaction/transferBatchDetail',
      name: `${pre}transTransaction-transferBatchDetail`,
      component: _import('transferRemit/transTransaction/transferBatchDetail'),
      meta: {
        ...meta,
        title: '批量转账查询详情',
        highlightTo: 'transferBatchQry',
      },
    },
  ])('transferRemit-'),
};
